
import request from '@/utils/request'
import router from '@/router/routers'
import Vue from "vue"
export function add(data) {
  return request({
    url: data.newsId ? '/api/news/art/edit' : '/api/news/art/create',
    method: 'post',
    data
  })
}
export function other() {
  Vue.$property.$refs.schoolAddDialog.add({})
}
export function del(data) {
  return request({
    url: `/api/news/art/delete`,
    method: 'post',
    data
  })
}
export function edit(data) {
  return request({
    url: '/api/news/art/edit',
    method: 'post',
    data
  })
}
export function getList(data) {
  return request({
    url: '/api/news/art/list',
    method: 'post',
    data
  })
}
export function getInfoById(data) {
  return request({
    url: '/api/news/art/detail',
    method: 'post',
    data
  })
}

export default { add, edit, del, getList, getInfoById, other }
